package com.spring.task1.model;

import lombok.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @author 超
 * Create by fengc on  2022/9/8 20:15
 */
@Data
@ToString(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
@Builder
//注解方式，交给Spring容器管理
@Component("student1")
public class Student {

    @Value("小明")
    private String name;

    @Autowired
    @Qualifier(value = "address2")
    private Address address;

}
